<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="author" content="esy">
    
    <meta name="description" content="esy">
    
    
    
    
    
    
    <title>状态为3时的设定 | ESY</title>
    <link href="https://esyyes.github.io" rel="prefetch" />

    
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/aos.css">
<link rel="stylesheet" href="/css/style.css">

    
<script src="/js/jquery.min.js"></script>

    
<script src="/js/bootstrap.min.js"></script>

    
<script src="/js/aos.js"></script>

    
<script src="/js/highslide/highslide-full.min.js"></script>

    
<link rel="stylesheet" href="/js/highslide/highslide.css">

    <style type="text/css">
        @media (max-width: 768px) {
            body {
                background-color: #f0f0f0;
                background: url('/imgs/xsbg.gif');
                background-attachment: fixed;
            }
        }
    </style>
    
    <!--<script type="text/javascript">
      if (document.images) {
        var avatar = new Image();
        avatar.src = '/imgs/avatar.jpg'
        var previews = 'preview1.jpg,preview2.jpg,preview3.jpg,preview4.jpg'.split(',')
        var previewsPreLoad = []
        for(var i = 0; i < length; i++) {
          previewsPreLoad.push(new Image())
          previewsPreLoad[previewsPreLoad.length - 1].src = '/imgs/preview' + previews[i]
        }
      }
    </script>-->
<meta name="generator" content="Hexo 5.2.0"></head>
<body>
    <!-- 背景轮播图功能 -->
    <section class="hidden-xs">
    <ul class="cb-slideshow">
        <li><span>天若</span></li>
        <li><span>有情</span></li>
        <li><span>天亦老</span></li>
        <li><span>我为</span></li>
        <li><span>长者</span></li>
        <li><span>续一秒</span></li>
    </ul>
</section>
    <!-- 欧尼酱功能, 谁用谁知道 -->
    
    <div class="gal-menu gal-dropdown">
    <div class="circle" id="gal">
        <div class="ring">
            <a href="https://esyyes.github.io" class="menuItem" style="left: 50%; top: 15%;">首页</a>
            
            <a class="menuItem" style="left: 80.3109%; top: 32.5%;">下一页</a>
            
            <a href="/archives" class="menuItem" style="left: 80.3109%; top: 67.5%;">归档</a>
            <a href="/about" class="menuItem" style="left: 50%; top: 85%;">关于</a>
            <a href="/message" class="menuItem" style="left: 19.6891%; top: 67.5%;">留言板</a>

            
            <a class="menuItem" style="left: 19.6891%; top: 32.5%;">上一页</a>
            
        </div>
        <audio id="audio" src="/imgs/oni.mp3"></audio>
    </div>
</div>
    
    <header class="navbar navbar-inverse" id="gal-header">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed"
                    data-toggle="collapse" data-target=".bs-navbar-collapse"
                    aria-expanded="false">
                <span class="fa fa-lg fa-reorder"></span>
            </button>
            <a href="https://esyyes.github.io">
                
                <style>
                    #gal-header .navbar-brand {
                        height: 54px;
                        line-height: 24px;
                        font-size: 28px;
                        opacity: 1;
                        background-color: rgba(0,0,0,0);
                        text-shadow: 0 0 5px #fff,0 0 10px #fff,0 0 15px #fff,0 0 20px #228DFF,0 0 35px #228DFF,0 0 40px #228DFF,0 0 50px #228DFF,0 0 75px #228DFF;
                    }
                </style>
                <!-- 这里使用文字(navbar_text or config.title) -->
                <div class="navbar-brand">ESY</div>
                
            </a>
        </div>
        <div class="collapse navbar-collapse bs-navbar-collapse">
            <ul class="nav navbar-nav" id="menu-gal">
                
                
                <li class="">
                    <a href="/">
                        <i class="fa fa-home"></i>首页
                    </a>
                </li>
                
                
                
                <li class="">
                    <a href="/archives">
                        <i class="fa fa-archive"></i>归档
                    </a>
                </li>
                
                
                
                
                <li class="dropdown">
                    <!-- TODO 添加hover dropdown效果 -->
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false" data-hover="dropdown">
                        <i class="fa fa-list"></i>分类
                    </a>
                    <ul class="dropdown-menu">
                        
                        
                        <li>
                            <a href="/categories/py-study/">py_study</a>
                        </li>
                        
                        <li>
                            <a href="/categories/nlp/">nlp</a>
                        </li>
                        
                        <li>
                            <a href="/categories/Graduation-work/">Graduation work</a>
                        </li>
                        
                        <li>
                            <a href="/categories/work/">work</a>
                        </li>
                        
                        <li>
                            <a href="/categories/hexo/">hexo</a>
                        </li>
                        
                        <li>
                            <a href="/categories/hexo%E5%AE%8C%E5%96%84/">-hexo完善</a>
                        </li>
                        
                        
                        <li>
                            <a href="/categories">...</a>
                        </li>
                        
                        
                    </ul>
                </li>
                
                
                
                
                
                <li class="dropdown">
                    <!-- TODO 添加hover dropdown效果 -->
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"
                       aria-haspopup="true" aria-expanded="false" data-hover="dropdown">
                        <i class="fa fa-tags"></i>标签
                    </a>
                    <ul class="dropdown-menu">
                        
                        
                        <li>
                            <a href="/tags/py-study/">py_study</a>
                        </li>
                        
                        <li>
                            <a href="/tags/nlp/">nlp</a>
                        </li>
                        
                        <li>
                            <a href="/tags/Graduation-work/">Graduation work</a>
                        </li>
                        
                        <li>
                            <a href="/tags/work/">work</a>
                        </li>
                        
                        <li>
                            <a href="/tags/hexo/">hexo</a>
                        </li>
                        
                        <li>
                            <a href="/tags/%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/">-个人博客搭建</a>
                        </li>
                        
                        
                        <li>
                            <a href="/tags">...</a>
                        </li>
                        
                        
                    </ul>
                </li>
                
                
                
                
                <li class="">
                    <a href="/about">
                        <i class="fa fa-user"></i>关于我
                    </a>
                </li>
                
                
            </ul>
        </div>
    </div>
</header>
    <div id="gal-body">
        <div class="container">
            <div class="row">
                <div class="col-md-8 gal-right" id="mainstay">
                    
<article class="article well article-body" id="article">
    <div class="breadcrumb">
        <i class="fa fa-home"></i>
        <a href="https://esyyes.github.io">ESY</a>
        >
        <span>状态为3时的设定</span>
    </div>
    <!-- 大型设备详细文章 -->
    <div class="hidden-xs">
        <div class="title-article">
            <h1>
                <a href="/2020/07/08/python%20work/%E7%8A%B6%E6%80%81%E4%B8%BA3%E6%97%B6%E7%9A%84%E8%AE%BE%E5%AE%9A/">状态为3时的设定</a>
            </h1>
        </div>
        <div class="tag-article">
            
            <span class="label label-gal">
                <i class="fa fa-tags"></i>
                
                <a href="/tags/work/">work</a>
                
            </span>
            
            <span class="label label-gal">
                <i class="fa fa-calendar"></i> 2020-07-08
            </span>
            
        </div>
    </div>
    <!-- 小型设备详细文章 -->
    <div class="visible-xs">
        <center>
            <div class="title-article">
                <h4>
                    <a href="/2020/07/08/python%20work/%E7%8A%B6%E6%80%81%E4%B8%BA3%E6%97%B6%E7%9A%84%E8%AE%BE%E5%AE%9A/">状态为3时的设定</a>
                </h4>
            </div>
            <p>
                <i class="fa fa-calendar"></i> 2020-07-08
            </p>
            <p>
                
                <i class="fa fa-tags"></i>
                
                <a href="/tags/work/">work</a>
                
                
                
            </p>
        </center>
    </div>
    <div class="content-article">
        <h1 id="状态为3是的B值设定"><a href="#状态为3是的B值设定" class="headerlink" title="状态为3是的B值设定"></a>状态为3是的B值设定</h1><p>划分为状态3# 状态1：小于平均值的# 状态2：小于标准差# 状态3：大于标准差</p>
<p>将里面的数据直接划分为3个状态，按照3个状态的区间范围，去设定序列的状态值</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># -*- coding: utf-8 -*-</span></span><br><span class="line"><span class="comment"># @Time     : 2020/7/8</span></span><br><span class="line"><span class="comment"># @Author   : esy</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> pandas <span class="keyword">as</span> pd</span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"><span class="keyword">import</span> warnings</span><br><span class="line"></span><br><span class="line"><span class="comment"># 忽略警告</span></span><br><span class="line">warnings.filterwarnings(<span class="string">&quot;ignore&quot;</span>)</span><br><span class="line">data = pd.read_excel(<span class="string">&#x27;data1&#x27;</span> + <span class="string">&#x27;.xlsx&#x27;</span>)</span><br><span class="line">data.fillna(<span class="number">0</span>, inplace=<span class="literal">True</span>)</span><br><span class="line">list_data = np.array(data).tolist()</span><br><span class="line">X = pd.get_dummies(data.iloc[<span class="number">0</span>:<span class="built_in">len</span>(data), <span class="number">3</span>:<span class="number">7</span>])</span><br><span class="line"></span><br><span class="line">list_y1 = [<span class="built_in">int</span>(list_data[i][<span class="number">2</span>]) <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(data))]</span><br><span class="line">y1_mean = np.array(list_y1).mean()</span><br><span class="line">y1_std = np.array(list_y1).std()</span><br><span class="line"></span><br><span class="line"><span class="comment"># 划分为状态3</span></span><br><span class="line"><span class="comment"># 状态1：小于平均值的</span></span><br><span class="line"><span class="comment"># 状态2：小于标准差</span></span><br><span class="line"><span class="comment"># 状态3：大于标准差</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 序列中出现0,1,2阶段的数目</span></span><br><span class="line">Y_X = []</span><br><span class="line">num1 = <span class="number">0</span></span><br><span class="line">num2 = <span class="number">0</span></span><br><span class="line">num3 = <span class="number">0</span></span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(data)):</span><br><span class="line">    <span class="keyword">if</span> list_data[i][<span class="number">2</span>] &lt; <span class="number">1</span>:</span><br><span class="line">        Y_X.append(<span class="number">0</span>)</span><br><span class="line">        num1 += <span class="number">1</span></span><br><span class="line">    <span class="keyword">elif</span> <span class="number">1</span> &lt;= list_data[i][<span class="number">2</span>] &lt; y1_std:</span><br><span class="line">        Y_X.append(<span class="number">1</span>)</span><br><span class="line">        num2 += <span class="number">2</span></span><br><span class="line">    <span class="keyword">else</span>:</span><br><span class="line">        Y_X.append(<span class="number">2</span>)</span><br><span class="line">        num3 += <span class="number">1</span></span><br><span class="line">print(<span class="string">f&#x27;阶段1的个数：<span class="subst">&#123;num1&#125;</span>,阶段2的个数：<span class="subst">&#123;num2&#125;</span>,阶段3的个数：<span class="subst">&#123;num3&#125;</span>&#x27;</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 将14个时期取平均值</span></span><br><span class="line">list_z_y = []</span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">int</span>(<span class="built_in">len</span>(data)/<span class="number">14</span>)):</span><br><span class="line">    y1 = []</span><br><span class="line">    <span class="keyword">for</span> j <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(data)):</span><br><span class="line">        <span class="keyword">if</span> <span class="number">14</span> * i &lt;= j &lt; <span class="number">14</span> * (i + <span class="number">1</span>):</span><br><span class="line">            y1.append(list_data[j][<span class="number">2</span>])</span><br><span class="line">    list_z_y.append(np.array(y1).mean())</span><br><span class="line"></span><br><span class="line"><span class="comment"># 判断序列阶段出现出现的次数</span></span><br><span class="line">num1_z = <span class="number">0</span></span><br><span class="line">num2_z = <span class="number">0</span></span><br><span class="line">num3_z = <span class="number">0</span></span><br><span class="line">Y_Z = []</span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(list_z_y)):</span><br><span class="line">    <span class="keyword">if</span> list_z_y[i] &lt; <span class="number">1</span>:</span><br><span class="line">        Y_Z.append(<span class="number">0</span>)</span><br><span class="line">        num1_z += <span class="number">1</span></span><br><span class="line">    <span class="keyword">elif</span> <span class="number">1</span> &lt;= list_z_y[i] &lt; y1_std:</span><br><span class="line">        Y_Z.append(<span class="number">1</span>)</span><br><span class="line">        num2_z += <span class="number">1</span></span><br><span class="line">    <span class="keyword">else</span>:</span><br><span class="line">        Y_Z.append(<span class="number">2</span>)</span><br><span class="line">        num3_z += <span class="number">1</span></span><br><span class="line"></span><br><span class="line">print(<span class="string">f&#x27;阶段1的序列个数：<span class="subst">&#123;num1_z&#125;</span>,阶段2的序列个数：<span class="subst">&#123;num2_z&#125;</span>, 阶段3的序列个数：<span class="subst">&#123;num3_z&#125;</span>&#x27;</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 将其划分为14个一组一个序列</span></span><br><span class="line">Y = []</span><br><span class="line"><span class="keyword">for</span> j <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">int</span>(<span class="built_in">len</span>(data)/<span class="number">14</span>)):</span><br><span class="line">    x1 = []</span><br><span class="line">    <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(data)):</span><br><span class="line">        <span class="keyword">if</span> <span class="number">14</span> * j &lt;= i &lt; <span class="number">14</span> * (j + <span class="number">1</span>):</span><br><span class="line">            x1.append(Y_X[i])</span><br><span class="line">    Y.append(x1)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 判断阶段1中出现012的次数</span></span><br><span class="line">num_j1 = <span class="number">0</span></span><br><span class="line">num_j2 = <span class="number">0</span></span><br><span class="line">num_j3 = <span class="number">0</span></span><br><span class="line">num_k1 = <span class="number">0</span></span><br><span class="line">num_k2 = <span class="number">0</span></span><br><span class="line">num_k3 = <span class="number">0</span></span><br><span class="line">num_b1 = <span class="number">0</span></span><br><span class="line">num_b2 = <span class="number">0</span></span><br><span class="line">num_b3 = <span class="number">0</span></span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(Y_Z)):</span><br><span class="line">    <span class="keyword">if</span> Y_Z[i] == <span class="number">0</span>:</span><br><span class="line">        <span class="keyword">for</span> j <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">14</span>):</span><br><span class="line">            <span class="keyword">if</span> Y[i][j] == <span class="number">0</span>:</span><br><span class="line">                num_j1 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">elif</span> Y[i][j] == <span class="number">1</span>:</span><br><span class="line">                num_j2 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">else</span>:</span><br><span class="line">                num_j3 += <span class="number">1</span></span><br><span class="line">    <span class="keyword">elif</span> Y_Z[i] == <span class="number">1</span>:</span><br><span class="line">        <span class="keyword">for</span> k <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">14</span>):</span><br><span class="line">            <span class="keyword">if</span> Y[i][k] == <span class="number">0</span>:</span><br><span class="line">                num_k1 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">elif</span> Y[i][k] == <span class="number">1</span>:</span><br><span class="line">                num_k2 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">else</span>:</span><br><span class="line">                num_k3 += <span class="number">1</span></span><br><span class="line">    <span class="keyword">elif</span> Y_Z[i] == <span class="number">2</span>:</span><br><span class="line">        <span class="keyword">for</span> b <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">14</span>):</span><br><span class="line">            <span class="keyword">if</span> Y[i][b] == <span class="number">0</span>:</span><br><span class="line">                num_b1 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">elif</span> Y[i][b] == <span class="number">1</span>:</span><br><span class="line">                num_b2 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">else</span>:</span><br><span class="line">                num_b3 += <span class="number">1</span></span><br><span class="line">print(<span class="string">f&#x27;阶段1中状态1的个数  <span class="subst">&#123;num_j1&#125;</span>，状态2的个数<span class="subst">&#123;num_j2&#125;</span>，状态2的个数<span class="subst">&#123;num_j3&#125;</span>&#x27;</span>)</span><br><span class="line">print(<span class="string">f&#x27;阶段2中状态1的个数  <span class="subst">&#123;num_k1&#125;</span>，  状态2的个数  <span class="subst">&#123;num_k2&#125;</span>，状态2的个数<span class="subst">&#123;num_k3&#125;</span>&#x27;</span>)</span><br><span class="line">print(<span class="string">f&#x27;阶段3中状态1的个数  <span class="subst">&#123;num_b1&#125;</span>，  状态2的个数  <span class="subst">&#123;num_b2&#125;</span>，状态2的个数<span class="subst">&#123;num_b3&#125;</span>&#x27;</span>)</span><br><span class="line"></span><br><span class="line">B = [[num_j1/num1_z/<span class="number">14</span>, num_j2/num1_z/<span class="number">14</span>, num_j3/num1_z/<span class="number">14</span>],</span><br><span class="line">     [num_k1/num2_z/<span class="number">14</span>, num_k2/num2_z/<span class="number">14</span>, num_k3/num2_z/<span class="number">14</span>],</span><br><span class="line">     [num_b1/num3_z/<span class="number">14</span>, num_b2/num3_z/<span class="number">14</span>, num_b3/num3_z/<span class="number">14</span>]]</span><br><span class="line">print(<span class="string">f&#x27;在阈值线为平均值下的<span class="subst">&#123;B&#125;</span>&#x27;</span>)</span><br></pre></td></tr></table></figure>

<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">阶段<span class="number">1</span>的个数：<span class="number">2461</span>,阶段<span class="number">2</span>的个数：<span class="number">1076</span>,阶段<span class="number">3</span>的个数：<span class="number">109</span></span><br><span class="line">阶段<span class="number">1</span>的序列个数：<span class="number">197</span>,阶段<span class="number">2</span>的序列个数：<span class="number">18</span>, 阶段<span class="number">3</span>的序列个数：<span class="number">7</span></span><br><span class="line">阶段<span class="number">1</span>中状态<span class="number">1</span>的个数  <span class="number">2418</span>，状态<span class="number">2</span>的个数<span class="number">340</span>，状态<span class="number">2</span>的个数<span class="number">0</span></span><br><span class="line">阶段<span class="number">2</span>中状态<span class="number">1</span>的个数  <span class="number">43</span>，  状态<span class="number">2</span>的个数  <span class="number">189</span>，状态<span class="number">2</span>的个数<span class="number">20</span></span><br><span class="line">阶段<span class="number">3</span>中状态<span class="number">1</span>的个数  <span class="number">0</span>，  状态<span class="number">2</span>的个数  <span class="number">9</span>，状态<span class="number">2</span>的个数<span class="number">89</span></span><br><span class="line">在阈值线为平均值下的[[<span class="number">0.8767222625090645</span>, <span class="number">0.12327773749093547</span>, <span class="number">0.0</span>], [<span class="number">0.17063492063492064</span>, <span class="number">0.75</span>, <span class="number">0.07936507936507937</span>], [<span class="number">0.0</span>, <span class="number">0.09183673469387756</span>, <span class="number">0.9081632653061223</span>]]</span><br></pre></td></tr></table></figure>

<p>将数据设定为4状态时</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br><span class="line">126</span><br><span class="line">127</span><br><span class="line">128</span><br><span class="line">129</span><br><span class="line">130</span><br><span class="line">131</span><br><span class="line">132</span><br><span class="line">133</span><br><span class="line">134</span><br><span class="line">135</span><br><span class="line">136</span><br><span class="line">137</span><br><span class="line">138</span><br><span class="line">139</span><br><span class="line">140</span><br><span class="line">141</span><br><span class="line">142</span><br><span class="line">143</span><br><span class="line">144</span><br><span class="line">145</span><br><span class="line">146</span><br><span class="line">147</span><br><span class="line">148</span><br><span class="line">149</span><br><span class="line">150</span><br><span class="line">151</span><br><span class="line">152</span><br><span class="line">153</span><br><span class="line">154</span><br><span class="line">155</span><br><span class="line">156</span><br><span class="line">157</span><br><span class="line">158</span><br><span class="line">159</span><br><span class="line">160</span><br><span class="line">161</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># -*- coding: utf-8 -*-</span></span><br><span class="line"><span class="comment"># @Time     : 2020/7/8</span></span><br><span class="line"><span class="comment"># @Author   : esy</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">import</span> pandas <span class="keyword">as</span> pd</span><br><span class="line"><span class="keyword">import</span> numpy <span class="keyword">as</span> np</span><br><span class="line"><span class="keyword">import</span> warnings</span><br><span class="line"></span><br><span class="line"><span class="comment"># 忽略警告</span></span><br><span class="line">warnings.filterwarnings(<span class="string">&quot;ignore&quot;</span>)</span><br><span class="line">data = pd.read_excel(<span class="string">&#x27;data1&#x27;</span> + <span class="string">&#x27;.xlsx&#x27;</span>)</span><br><span class="line">data.fillna(<span class="number">0</span>, inplace=<span class="literal">True</span>)</span><br><span class="line">list_data = np.array(data).tolist()</span><br><span class="line">X = pd.get_dummies(data.iloc[<span class="number">0</span>:<span class="built_in">len</span>(data), <span class="number">3</span>:<span class="number">7</span>])</span><br><span class="line"></span><br><span class="line">list_y1 = [<span class="built_in">int</span>(list_data[i][<span class="number">2</span>]) <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(data))]</span><br><span class="line">y1_mean = np.array(list_y1).mean()</span><br><span class="line">y1_std = np.array(list_y1).std()</span><br><span class="line"></span><br><span class="line"><span class="comment"># 划分为状态4</span></span><br><span class="line"><span class="comment"># # 状态1：小于平均值的</span></span><br><span class="line"><span class="comment"># # 状态2：小于标准差</span></span><br><span class="line"><span class="comment"># # 状态3：小于方差的</span></span><br><span class="line"><span class="comment"># # 状态4：大于方差的</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 序列中出现0,1,2阶段的数目</span></span><br><span class="line">Y_X = []</span><br><span class="line">num1 = <span class="number">0</span></span><br><span class="line">num2 = <span class="number">0</span></span><br><span class="line">num3 = <span class="number">0</span></span><br><span class="line">num4 = <span class="number">0</span></span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(data)):</span><br><span class="line">    <span class="keyword">if</span> list_data[i][<span class="number">2</span>] &lt; <span class="number">1</span>:</span><br><span class="line">        Y_X.append(<span class="number">0</span>)</span><br><span class="line">        num1 += <span class="number">1</span></span><br><span class="line">    <span class="keyword">elif</span> <span class="number">1</span> &lt;= list_data[i][<span class="number">2</span>] &lt; y1_std:</span><br><span class="line">        Y_X.append(<span class="number">1</span>)</span><br><span class="line">        num2 += <span class="number">2</span></span><br><span class="line">    <span class="keyword">elif</span> y1_std &lt;= list_data[i][<span class="number">2</span>] &lt; y1_std*y1_std:</span><br><span class="line">        Y_X.append(<span class="number">2</span>)</span><br><span class="line">        num3 += <span class="number">1</span></span><br><span class="line">    <span class="keyword">else</span>:</span><br><span class="line">        Y_X.append(<span class="number">3</span>)</span><br><span class="line">        num4 += <span class="number">1</span></span><br><span class="line"></span><br><span class="line">print(<span class="string">f&#x27;阶段1的个数：<span class="subst">&#123;num1&#125;</span>,阶段2的个数：<span class="subst">&#123;num2&#125;</span>, 阶段3的个数：<span class="subst">&#123;num3&#125;</span>, 阶段4的个数：<span class="subst">&#123;num4&#125;</span>&#x27;</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 将14个时期取平均值</span></span><br><span class="line">list_z_y = []</span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">int</span>(<span class="built_in">len</span>(data)/<span class="number">14</span>)):</span><br><span class="line">    y1 = []</span><br><span class="line">    <span class="keyword">for</span> j <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(data)):</span><br><span class="line">        <span class="keyword">if</span> <span class="number">14</span> * i &lt;= j &lt; <span class="number">14</span> * (i + <span class="number">1</span>):</span><br><span class="line">            y1.append(list_data[j][<span class="number">2</span>])</span><br><span class="line">    list_z_y.append(np.array(y1).mean())</span><br><span class="line"></span><br><span class="line"><span class="comment"># 判断序列阶段出现出现的次数</span></span><br><span class="line">num1_z = <span class="number">0</span></span><br><span class="line">num2_z = <span class="number">0</span></span><br><span class="line">num3_z = <span class="number">0</span></span><br><span class="line">num4_z = <span class="number">0</span></span><br><span class="line">Y_Z = []</span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(list_z_y)):</span><br><span class="line">    <span class="keyword">if</span> list_z_y[i] &lt; <span class="number">1</span>:</span><br><span class="line">        Y_Z.append(<span class="number">0</span>)</span><br><span class="line">        num1_z += <span class="number">1</span></span><br><span class="line">    <span class="keyword">elif</span> <span class="number">1</span> &lt;= list_z_y[i] &lt; y1_std:</span><br><span class="line">        Y_Z.append(<span class="number">1</span>)</span><br><span class="line">        num2_z += <span class="number">1</span></span><br><span class="line">    <span class="keyword">elif</span> y1_std &lt;= list_z_y[i] &lt; y1_std * y1_std:</span><br><span class="line">        Y_Z.append(<span class="number">2</span>)</span><br><span class="line">        num3_z += <span class="number">1</span></span><br><span class="line">    <span class="keyword">else</span>:</span><br><span class="line">        Y_Z.append(<span class="number">3</span>)</span><br><span class="line">        num4_z += <span class="number">1</span></span><br><span class="line"></span><br><span class="line">print(<span class="string">f&#x27;阶段1的序列个数：<span class="subst">&#123;num1_z&#125;</span>,阶段2的序列个数：<span class="subst">&#123;num2_z&#125;</span>, 阶段3的序列个数：<span class="subst">&#123;num3_z&#125;</span>, 阶段4的序列个数：<span class="subst">&#123;num4_z&#125;</span>&#x27;</span>)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 将其划分为14个一组一个序列</span></span><br><span class="line">Y = []</span><br><span class="line"><span class="keyword">for</span> j <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">int</span>(<span class="built_in">len</span>(data)/<span class="number">14</span>)):</span><br><span class="line">    x1 = []</span><br><span class="line">    <span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(data)):</span><br><span class="line">        <span class="keyword">if</span> <span class="number">14</span> * j &lt;= i &lt; <span class="number">14</span> * (j + <span class="number">1</span>):</span><br><span class="line">            x1.append(Y_X[i])</span><br><span class="line">    Y.append(x1)</span><br><span class="line"></span><br><span class="line"><span class="comment"># 判断阶段1中出现012的次数</span></span><br><span class="line">num_j1 = <span class="number">0</span></span><br><span class="line">num_j2 = <span class="number">0</span></span><br><span class="line">num_j3 = <span class="number">0</span></span><br><span class="line">num_j4 = <span class="number">0</span></span><br><span class="line"></span><br><span class="line">num_k1 = <span class="number">0</span></span><br><span class="line">num_k2 = <span class="number">0</span></span><br><span class="line">num_k3 = <span class="number">0</span></span><br><span class="line">num_k4 = <span class="number">0</span></span><br><span class="line"></span><br><span class="line">num_b1 = <span class="number">0</span></span><br><span class="line">num_b2 = <span class="number">0</span></span><br><span class="line">num_b3 = <span class="number">0</span></span><br><span class="line">num_b4 = <span class="number">0</span></span><br><span class="line"></span><br><span class="line">num_h1 = <span class="number">0</span></span><br><span class="line">num_h2 = <span class="number">0</span></span><br><span class="line">num_h3 = <span class="number">0</span></span><br><span class="line">num_h4 = <span class="number">0</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> i <span class="keyword">in</span> <span class="built_in">range</span>(<span class="built_in">len</span>(Y_Z)):</span><br><span class="line">    <span class="keyword">if</span> Y_Z[i] == <span class="number">0</span>:</span><br><span class="line">        <span class="keyword">for</span> j <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">14</span>):</span><br><span class="line">            <span class="keyword">if</span> Y[i][j] == <span class="number">0</span>:</span><br><span class="line">                num_j1 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">elif</span> Y[i][j] == <span class="number">1</span>:</span><br><span class="line">                num_j2 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">elif</span> Y[i][j] == <span class="number">2</span>:</span><br><span class="line">                num_j3 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">else</span>:</span><br><span class="line">                num_j4 += <span class="number">1</span></span><br><span class="line">    <span class="keyword">elif</span> Y_Z[i] == <span class="number">1</span>:</span><br><span class="line">        <span class="keyword">for</span> k <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">14</span>):</span><br><span class="line">            <span class="keyword">if</span> Y[i][k] == <span class="number">0</span>:</span><br><span class="line">                num_k1 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">elif</span> Y[i][k] == <span class="number">1</span>:</span><br><span class="line">                num_k2 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">elif</span> Y[i][k] == <span class="number">2</span>:</span><br><span class="line">                num_k3 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">else</span>:</span><br><span class="line">                num_k4 += <span class="number">1</span></span><br><span class="line">    <span class="keyword">elif</span> Y_Z[i] == <span class="number">2</span>:</span><br><span class="line">        <span class="keyword">for</span> b <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">14</span>):</span><br><span class="line">            <span class="keyword">if</span> Y[i][b] == <span class="number">0</span>:</span><br><span class="line">                num_b1 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">elif</span> Y[i][b] == <span class="number">1</span>:</span><br><span class="line">                num_b2 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">elif</span> Y[i][b] == <span class="number">2</span>:</span><br><span class="line">                num_b3 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">else</span>:</span><br><span class="line">                num_b4 += <span class="number">1</span></span><br><span class="line">    <span class="keyword">elif</span> Y_Z[i] == <span class="number">3</span>:</span><br><span class="line">        <span class="keyword">for</span> h <span class="keyword">in</span> <span class="built_in">range</span>(<span class="number">14</span>):</span><br><span class="line">            <span class="keyword">if</span> Y[i][h] == <span class="number">0</span>:</span><br><span class="line">                num_h1 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">elif</span> Y[i][h] == <span class="number">1</span>:</span><br><span class="line">                num_h2 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">elif</span> Y[i][h] == <span class="number">2</span>:</span><br><span class="line">                num_h3 += <span class="number">1</span></span><br><span class="line">            <span class="keyword">else</span>:</span><br><span class="line">                num_h4 += <span class="number">1</span></span><br><span class="line"></span><br><span class="line">print(<span class="string">f&#x27;阶段1中状态1的个数  <span class="subst">&#123;num_j1&#125;</span>，状态2的个数<span class="subst">&#123;num_j2&#125;</span>，状态3的个数<span class="subst">&#123;num_j3&#125;</span>, 状态4的个数<span class="subst">&#123;num_j4&#125;</span>&#x27;</span>)</span><br><span class="line">print(<span class="string">f&#x27;阶段2中状态1的个数  <span class="subst">&#123;num_k1&#125;</span>，状态2的个数  <span class="subst">&#123;num_k2&#125;</span>，状态3的个数<span class="subst">&#123;num_k3&#125;</span>, 状态4的个数<span class="subst">&#123;num_k4&#125;</span>&#x27;</span>)</span><br><span class="line">print(<span class="string">f&#x27;阶段3中状态1的个数  <span class="subst">&#123;num_b1&#125;</span>，状态2的个数  <span class="subst">&#123;num_b2&#125;</span>，状态3的个数<span class="subst">&#123;num_b3&#125;</span>, 状态4的个数<span class="subst">&#123;num_b4&#125;</span>&#x27;</span>)</span><br><span class="line">print(<span class="string">f&#x27;阶段4中状态1的个数  <span class="subst">&#123;num_h1&#125;</span>，状态2的个数  <span class="subst">&#123;num_h2&#125;</span>，状态3的个数<span class="subst">&#123;num_h3&#125;</span>, 状态4的个数<span class="subst">&#123;num_h4&#125;</span>&#x27;</span>)</span><br><span class="line"></span><br><span class="line">B = [[num_j1/num1_z/<span class="number">14</span>, num_j2/num1_z/<span class="number">14</span>, num_j3/num1_z/<span class="number">14</span>, num_j4/num1_z/<span class="number">14</span>,],</span><br><span class="line">     [num_k1/num2_z/<span class="number">14</span>, num_k2/num2_z/<span class="number">14</span>, num_k3/num2_z/<span class="number">14</span>, num_k4/num2_z/<span class="number">14</span>],</span><br><span class="line">     [num_b1/num3_z/<span class="number">14</span>, num_b2/num3_z/<span class="number">14</span>, num_b3/num3_z/<span class="number">14</span>, num_b4/num3_z/<span class="number">14</span>],</span><br><span class="line">     [num_h1/num4_z/<span class="number">14</span>, num_h2/num4_z/<span class="number">14</span>, num_h3/num4_z/<span class="number">14</span>, num_h4/num4_z/<span class="number">14</span>]</span><br><span class="line">     ]</span><br><span class="line">print(<span class="string">f&#x27;在阈值线为平均值下的<span class="subst">&#123;B&#125;</span>&#x27;</span>)</span><br></pre></td></tr></table></figure>

<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">阶段<span class="number">1</span>的个数：<span class="number">2461</span>,阶段<span class="number">2</span>的个数：<span class="number">1076</span>, 阶段<span class="number">3</span>的个数：<span class="number">94</span>, 阶段<span class="number">4</span>的个数：<span class="number">15</span></span><br><span class="line">阶段<span class="number">1</span>的序列个数：<span class="number">197</span>,阶段<span class="number">2</span>的序列个数：<span class="number">18</span>, 阶段<span class="number">3</span>的序列个数：<span class="number">6</span>, 阶段<span class="number">4</span>的序列个数：<span class="number">1</span></span><br><span class="line">阶段<span class="number">1</span>中状态<span class="number">1</span>的个数  <span class="number">2418</span>，状态<span class="number">2</span>的个数<span class="number">340</span>，状态<span class="number">3</span>的个数<span class="number">0</span>, 状态<span class="number">4</span>的个数<span class="number">0</span></span><br><span class="line">阶段<span class="number">2</span>中状态<span class="number">1</span>的个数  <span class="number">43</span>，状态<span class="number">2</span>的个数  <span class="number">189</span>，状态<span class="number">3</span>的个数<span class="number">20</span>, 状态<span class="number">4</span>的个数<span class="number">0</span></span><br><span class="line">阶段<span class="number">3</span>中状态<span class="number">1</span>的个数  <span class="number">0</span>，状态<span class="number">2</span>的个数  <span class="number">9</span>，状态<span class="number">3</span>的个数<span class="number">74</span>, 状态<span class="number">4</span>的个数<span class="number">1</span></span><br><span class="line">阶段<span class="number">4</span>中状态<span class="number">1</span>的个数  <span class="number">0</span>，状态<span class="number">2</span>的个数  <span class="number">0</span>，状态<span class="number">3</span>的个数<span class="number">0</span>, 状态<span class="number">4</span>的个数<span class="number">14</span></span><br><span class="line">在阈值线为平均值下的[[<span class="number">0.8767222625090645</span>, <span class="number">0.12327773749093547</span>, <span class="number">0.0</span>, <span class="number">0.0</span>], [<span class="number">0.17063492063492064</span>, <span class="number">0.75</span>, <span class="number">0.07936507936507937</span>, <span class="number">0.0</span>], [<span class="number">0.0</span>, <span class="number">0.10714285714285714</span>, <span class="number">0.880952380952381</span>, <span class="number">0.011904761904761904</span>], [<span class="number">0.0</span>, <span class="number">0.0</span>, <span class="number">0.0</span>, <span class="number">1.0</span>]]</span><br></pre></td></tr></table></figure>

<p>因此现在B2：</p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">B_2 = [[<span class="number">0.78535170413343</span>, <span class="number">0.21464829586656997</span>],</span><br><span class="line">       [<span class="number">0.8428571428571429</span>, <span class="number">0.15714285714285714</span>]]</span><br><span class="line">B_3 = [[<span class="number">0.8767222625090645</span>, <span class="number">0.12327773749093547</span>, <span class="number">0.0</span>],</span><br><span class="line">       [<span class="number">0.17063492063492064</span>, <span class="number">0.75</span>, <span class="number">0.07936507936507937</span>],</span><br><span class="line">       [<span class="number">0.0</span>, <span class="number">0.09183673469387756</span>, <span class="number">0.9081632653061223</span>]]</span><br><span class="line">B_4 = [[<span class="number">0.8767222625090645</span>, <span class="number">0.12327773749093547</span>, <span class="number">0.0</span>, <span class="number">0.0</span>],</span><br><span class="line">       [<span class="number">0.17063492063492064</span>, <span class="number">0.75</span>, <span class="number">0.07936507936507937</span>, <span class="number">0.0</span>],</span><br><span class="line">       [<span class="number">0.0</span>, <span class="number">0.10714285714285714</span>, <span class="number">0.880952380952381</span>, <span class="number">0.011904761904761904</span>],</span><br><span class="line">       [<span class="number">0.0</span>, <span class="number">0.0</span>, <span class="number">0.0</span>, <span class="number">1.0</span>]]</span><br></pre></td></tr></table></figure>

<p><img src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1594262532884&di=531d0fbc2e24db968ffac8fbc73b3d42&imgtype=0&src=http://t7.baidu.com/it/u=784355040,1080860592&fm=193"></p>

    </div>
</article>


                </div>
                <aside class="col-md-4 gal-left" id="sidebar">
    <!-- 此为sidebar的搜索框, 非搜索结果页面 -->
<aside id="sidebar-search">
    <div class="search hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <form class="form-inline clearfix" id="search-form" method="get"
              action="/search/index.html">
            <input type="text" name="s" class="form-control" id="searchInput" placeholder="搜索文章~" autocomplete="off">
            <button class="btn btn-danger btn-gal" type="submit">
                <i class="fa fa-search"></i>
            </button>
        </form>
    </div>
</aside>
    <aside id="sidebar-author">
    <div class="panel panel-gal" data-aos="flip-right" data-aos-duration="3000">
        <div class="panel-heading" style="text-align: center">
            <i class="fa fa-quote-left"></i>
            esy
            <i class="fa fa-quote-right"></i>
        </div>
        <div class="author-panel text-center">
            <img src="/imgs/avatar.jpg" width="140" height="140"
                 alt="个人头像" class="author-image">
            <p class="author-description"><p>esy</p>
</p>
        </div>
    </div>
</aside>
    
    <aside id="sidebar-recent_comments">
    <div class="panel panel-gal recent hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <div class="panel-heading">
            <i class="fa fa-comments"></i>
            最新评论
            <i class="fa fa-times-circle panel-remove"></i>
            <i class="fa fa-chevron-circle-up panel-toggle"></i>
        </div>
        <ul class="list-group list-group-flush"></ul>
    </div>
</aside>
    
    <!-- 要配置好leancloud才能开启此小工具 -->
    
    
    <aside id="sidebar-recent_posts">
    <div class="panel panel-gal recent hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <div class="panel-heading">
            <i class="fa fa-refresh"></i>
            近期文章
            <i class="fa fa-times-circle panel-remove"></i>
            <i class="fa fa-chevron-circle-up panel-toggle"></i>
        </div>
        <ul class="list-group list-group-flush">
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/05/python%20work/%E6%9C%80%E5%B0%8F%E4%BA%8C%E4%B9%98%E6%B3%95/">最小二乘法</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/05/python%20work/%E7%BB%9F%E8%AE%A1%E5%AD%A6%E4%B9%A0-%E7%AC%AC%E4%B8%80%E7%AB%A0/">统计学习--第一章</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/04/python%20work/hello-world/">Hello World</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/11/03/python%20work/%E5%88%86%E7%B1%BB%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%AF%84%E4%BC%B0%E6%8C%87%E6%A0%87/">分类模型的评估指标</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/10/21/python%20work/10-21-%E7%88%AC%E8%99%AB%E5%9F%BA%E7%A1%80/">10-21 爬虫基础</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/CRF%E7%9A%84%E6%95%B4%E4%BD%93%E6%B5%81%E7%A8%8B%E7%BB%93%E6%9E%9C/">CRF的整体流程结果</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/nlp-crf%E6%A8%A1%E5%9E%8B/">nlp_crf模型</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%983/">数学建模问题3</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%982/">数学建模问题2</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/25/python%20work/%E6%95%B0%E5%AD%A6%E5%BB%BA%E6%A8%A1%E9%97%AE%E9%A2%981/">数学建模问题1</a>
                </span>
            </li>
            
        </ul>
    </div>
</aside>
    
    
    <aside id="sidebar-rand_posts">
    <div class="panel panel-gal recent hidden-xs" data-aos="fade-up" data-aos-duration="2000">
        <div class="panel-heading">
            <i class="fa fa-refresh"></i>
            随机文章
            <i class="fa fa-times-circle panel-remove"></i>
            <i class="fa fa-chevron-circle-up panel-toggle"></i>
        </div>
        <ul class="list-group list-group-flush">
            
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/02/07/python%20work/python-%E8%8E%B7%E5%8F%96MIT%E6%95%B0%E6%8D%AE/">python__获取MIT数据</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/07/16/python%20work/q-a%E6%A3%80%E7%B4%A2%E5%BC%8F%E6%9C%BA%E5%99%A8%E4%BA%BA%E7%9A%84%E6%B5%81%E7%A8%8B/">q@a检索式机器人的流程</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/07/15/python%20work/spacy%E7%9A%84%E5%9F%BA%E7%A1%80%E5%AD%A6%E4%B9%A0/">spacy的基础学习</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/09/02/python%20work/tensorflow2-3%E7%89%88%E6%9C%AC%E5%AE%89%E8%A3%85/">tensorflow2.3版本安装</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/06/09/python%20work/%E6%95%B0%E6%8D%AE%E9%A2%84%E5%A4%84%E7%90%86/">数据预处理</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/08/24/python%20work/%E6%9F%A5%E7%9C%8B%E5%8D%95%E7%8B%AC%E6%95%B0%E6%8D%AE%E4%B8%8B%E7%9A%84%E5%87%86%E7%A1%AE%E7%8E%87/">查看单独数据下的准确率</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/08/23/python%20work/%E7%BB%98%E5%88%B6%E7%89%B9%E5%BE%81%E9%80%89%E6%8B%A9%E7%BB%93%E6%9E%9C%E5%9B%BE/">绘制特征选择结果图</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/08/22/python%20work/%E9%87%8D%E6%96%B0%E8%BF%9B%E8%A1%8C%E7%89%B9%E5%BE%81%E7%AD%9B%E9%80%89/">重新进行特征筛选</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/05/28/python%20work/%E9%9D%A2%E5%90%91%E5%AF%B9%E8%B1%A1%E7%89%88%E5%AD%A6%E5%91%98%E7%AE%A1%E7%90%86%E7%B3%BB%E7%BB%9F/">面向对象版学员管理系统</a>
                </span>
            </li>
            
            <li class="list-group-item">
                <span class="post-title">
                    <a href="/2020/07/27/python%20work/%E6%A0%B7%E6%9C%AC%E6%95%B0%E6%8D%AE%E7%9A%84%E7%94%9F%E6%88%90/">样本数据的生成</a>
                </span>
            </li>
            
        </ul>
    </div>
</aside>
    
    
    <aside id="gal-sets">
        <div class="panel panel-gal hidden-xs" data-aos="fade-up" data-aos-duration="2000">
            <ul class="nav nav-pills pills-gal">

                
                <li>
                    <a href="/2020/07/08/python%20work/%E7%8A%B6%E6%80%81%E4%B8%BA3%E6%97%B6%E7%9A%84%E8%AE%BE%E5%AE%9A/index.html#sidebar-tags" data-toggle="tab" id="tags-tab">热门标签</a>
                </li>
                
                
                <li>
                    <a href="/2020/07/08/python%20work/%E7%8A%B6%E6%80%81%E4%B8%BA3%E6%97%B6%E7%9A%84%E8%AE%BE%E5%AE%9A/index.html#sidebar-friend-links" data-toggle="tab" id="friend-links-tab">友情链接</a>
                </li>
                
                
                <li>
                    <a href="/2020/07/08/python%20work/%E7%8A%B6%E6%80%81%E4%B8%BA3%E6%97%B6%E7%9A%84%E8%AE%BE%E5%AE%9A/index.html#sidebar-links" data-toggle="tab" id="links-tab">个人链接</a>
                </li>
                
            </ul>
            <div class="tab-content">
                
                <div class="cloud-tags tab-pane nav bs-sidenav fade" id="sidebar-tags">
    
    <a href="/tags/py-study/" style="font-size: 12.906222583309024px;" class="tag-cloud-link">py_study</a>
    
    <a href="/tags/nlp/" style="font-size: 18.50871520074363px;" class="tag-cloud-link">nlp</a>
    
    <a href="/tags/Graduation-work/" style="font-size: 13.329132995803608px;" class="tag-cloud-link">Graduation work</a>
    
    <a href="/tags/work/" style="font-size: 10.555222014599691px;" class="tag-cloud-link">work</a>
    
    <a href="/tags/hexo/" style="font-size: 16.192567702136298px;" class="tag-cloud-link">hexo</a>
    
    <a href="/tags/%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2%E6%90%AD%E5%BB%BA/" style="font-size: 10.79450651173748px;" class="tag-cloud-link">-个人博客搭建</a>
    
    <a href="/tags/malab-%E6%AF%95%E4%B8%9A/" style="font-size: 11.14179492573978px;" class="tag-cloud-link">-malab -毕业</a>
    
    <a href="/tags/python-%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/" style="font-size: 19.726219430751797px;" class="tag-cloud-link">-python -人工智能</a>
    
    <a href="/tags/python/" style="font-size: 9.152608344626792px;" class="tag-cloud-link">python</a>
    
    <a href="/tags/python/" style="font-size: 14.032179903626783px;" class="tag-cloud-link">-python</a>
    
    <a href="/tags/mathematical-modeling/" style="font-size: 15.214650164256373px;" class="tag-cloud-link">mathematical modeling</a>
    
    <a href="/tags/statistical-learning/" style="font-size: 14.951993299845412px;" class="tag-cloud-link">statistical learning</a>
    
</div>
                
                
                <div class="friend-links tab-pane nav bs-sidenav fade" id="sidebar-friend-links">
    
    <li>
        <a href="http://kdays.net/days/" target="_blank">KDays Forum</a>
    </li>
    
    <li>
        <a href="http://www.gal123.com/" target="_blank">绅士导航♂</a>
    </li>
    
    <li>
        <a href="http://www.moe123.com/" target="_blank">萌导航</a>
    </li>
    
</div>
                
                
                <div class="links tab-pane nav bs-sidenav fade" id="sidebar-links">
    
    <li>
        <a href="https://github.com/ZEROKISEKI/" target="_blank">Github</a>
    </li>
    
    <li>
        <a href="https://coding.net/u/SORA1" target="_blank">Coding</a>
    </li>
    
    <li>
        <a href="https://www.zhihu.com/people/aonosora/activities" target="_blank">知乎</a>
    </li>
    
</div>
                
            </div>
        </div>
    </aside>
    
</aside>
            </div>
        </div>
    </div>
    <footer id="gal-footer">
    <div class="container">
        Copyright © 2018 esy Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>.&nbsp;Theme by <a href="https://github.com/ZEROKISEKI" target="_blank">AONOSORA</a>
    </div>
</footer>

<!-- 回到顶端 -->
<div id="gal-gotop">
    <i class="fa fa-angle-up"></i>
</div>
</body>

<script src="/js/activate-power-mode.js"></script>

<script>

    // 配置highslide
	hs.graphicsDir = '/js/highslide/graphics/'
    hs.outlineType = "rounded-white";
    hs.dimmingOpacity = 0.8;
    hs.outlineWhileAnimating = true;
    hs.showCredits = false;
    hs.captionEval = "this.thumb.alt";
    hs.numberPosition = "caption";
    hs.align = "center";
    hs.transitions = ["expand", "crossfade"];
    hs.lang.number = '共%2张图, 当前是第%1张';
    hs.addSlideshow({
      interval: 5000,
      repeat: true,
      useControls: true,
      fixedControls: "fit",
      overlayOptions: {
        opacity: 0.75,
        position: "bottom center",
        hideOnMouseOut: true
      }
    })

    // 初始化aos
    AOS.init({
      duration: 1000,
      delay: 0,
      easing: 'ease-out-back'
    });

</script>
<script>
	POWERMODE.colorful = 'true';    // make power mode colorful
	POWERMODE.shake = 'true';       // turn off shake
	// TODO 这里根据具体情况修改
	document.body.addEventListener('input', POWERMODE);
</script>
<script>
    window.slideConfig = {
      prefix: '/imgs/slide/background',
      ext: 'jpg',
      maxCount: '6'
    }
</script>

<script src="/js/hs.js"></script>
<script src="/js/blog.js"></script>



<script src="/js/oni.js"></script>




</html>